package StudentSysterm;

import java.util.ArrayList;
import java.util.Random;

public class code {
    public static void main(String[] args) {
        ArrayList<Character> list=new ArrayList<>();
        for (int i = 0; i <26 ; i++) {
            list.add((char) ('a'+ i));
            list.add((char) ('A'+ i));
        }
        Random r=new Random();
        StringBuilder sb=new StringBuilder();
        for (int i = 0; i < 4; i++) {
            int index=r.nextInt(list.size());
            char c = list.get(index);
            sb.append(c);
        }
        int num=r.nextInt(10);
        sb.append(num);

        char[] chars = sb.toString().toCharArray();
        int randomindex = r.nextInt(chars.length-1);
        char temp=chars[randomindex];
        chars[randomindex]=chars[chars.length-1];
        chars[chars.length-1]=temp;
        System.out.println(new String(chars));
    }
}
